/**
 * 
 */
package com.wubo.sec.log;

import com.wubo.sec.model.ErrorLog;
import com.wubo.sec.service.IErrorLogService;

/**
 * 
 * @author wubo
 * @CreateDate 2010-7-30
 * @version 1.0.01
 */
public class ErrorLogAppender implements ILogAppender {

	private IErrorLogService errorLogService;
	
	public IErrorLogService getErrorLogService() {
		return errorLogService;
	}
	
	public void setErrorLogService(IErrorLogService errorLogService) {
		this.errorLogService = errorLogService;
	}

	public void append(ILog log) {
		errorLogService.save((ErrorLog) log);
	}

	public boolean supports(Class<?> logClass) {
		return ErrorLog.class.isAssignableFrom(logClass);
	}

}
